<?php
$url = url('admin','users-manager');
if(!isset($_GET['id'])){
    header("location: {$url}");
    exit(0);
} 
$user = $Bus->User->getItemById($_GET['id']);
if(!$user){
    
    header("location: {$url}");
    exit(0);
}

include 'component/header.php';
include 'component/slidebar.php'; 
?>
<!-- BEGIN CONTENT -->
<div id="content">
    <div class="box-out">
    	<div class="box-in">
    		<div class="box-head"><h1>Thông tin chi tiết người dùng</h1></div>
    		<div class="box-content">
                <div class="form">
    				<form>
    					<fieldset>
    						<label for="small_field">Username</label>
    						<input type="text" class="text small" disabled="true" value="<?php echo $user->users_name;?>" />
                            <label for="small_field">Password</label>
    						<input type="password" class="text small" disabled="true" value="***************" />
                            <label for="medium_field">Họ và Tên</label>
                            <input class="text medium" type="text"  disabled="true" value="<?php echo $user->users_fullname;?>"/>
                            <label for="medium_field">Địa chỉ</label>
                            <input class="text medium" type="text"  disabled="true" value="<?php echo $user->users_address;?>"/>
                            <label for="text_medium">Điện Thoại</label>
    						<input type="text" class="text medium" disabled="true" value="<?php echo $user->users_phone;?>" />
                            <label for="text medium">Ngày sinh <span style="font-weight: normal; font-style: italic;">(dd-mm-yyyy)</span></label>
    						<input type="text" class="text medium" disabled="true" value="<?php echo date("d/m/Y",strtotime($user->users_birthday));?>" />
                            <?php $group = $Bus->Group->getItemById($user->groups_idgroups);?>
                            <label for="text medium">Thuộc nhóm</label>
                            <input type="text" class="text medium" disabled="true" value="<?php echo $group->groups_name;?>" />
                            <?php $status = $Bus->Status_User->getItemById($user->userstatus_iduserstatus);?>
                            <label for="text medium">Trạng thái</label>
                            <input type="text" class="text medium" disabled="true" value="<?php echo $status->userstatus_name;?>" />
    						<hr />
    						<a class="submit" href="<?php echo url('admin','users-edit', array('id'=>$user->idusers));?>">Sửa thông tin</a>
                            <a class="submit" href="<?php echo url('admin','users-manager');?>">Về trang quản lý</a>
    					</fieldset>
    				</form>
    			</div><!-- end div .form -->
    		</div><!-- end div .box-content -->
    	</div><!-- end div .box-in -->
</div><!-- end div #content -->
<!-- END CONTENT -->

<?php
include 'component/footer.php'; 
?>
